package cn.web.demo.controller;

import cn.web.demo.model.Income;
import cn.web.demo.service.impl.CouseOrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/orderreportform")
public class IncomeController {

    @Autowired
    CouseOrderServiceImpl couseOrderService;

    @RequestMapping("/list")
    public String income(){
        return "/dataanalysis/income";
    }

    @RequestMapping("/incomejson")
    @ResponseBody
    public List<Income> incomejson(){
        List<Income> list=couseOrderService.incomejson();
        return list;
    }

}
